package cn.tedu.csms.storage.controller;


import cn.tedu.csms.base.response.JsonResult;
import cn.tedu.csms.storage.pojo.dto.StorageParam;
import cn.tedu.csms.storage.service.StorageService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("库存管理模块")
@Slf4j
@RestController
@RequestMapping("/v1/storage")
public class StorageContrller {
    @Autowired
    StorageService storageService;


    @PostMapping("save")
    public JsonResult saveStorage(StorageParam storageParam){
        log.debug("保存库存数据,参数{}",storageParam);
        storageService.saveStorage(storageParam);
        return JsonResult.ok();
    }

}
